package com.yyk.springservicetwo.facade.controller;

import com.yyk.config.commonService.exception.YYKCloudException;
import com.yyk.config.commonService.response.YYKCloudResponse;
import com.yyk.springservicetwo.facade.TwoFacade;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ljp
 * @CLASSNAME OneFacadeController
 * @date 2021/1/18 16:49
 * @description：
 */

@RestController
public class TwoFacadeController implements TwoFacade {


    @Override
    @GetMapping(path = "one/getTwoInfo/{id}")
    public YYKCloudResponse<String> getTwoInfo(@PathVariable("id") String id) {
        if (1==1) {
            throw new YYKCloudException("这个就是自定义业务异常");
        }
        return YYKCloudResponse.success(id);
    }
}
